package edu.csl.study.shardingsphere.transaction;


import edu.csl.study.shardingsphere.health.entity.EncryptUser;
import edu.csl.study.shardingsphere.health.service.IEncryptUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.sql.SQLException;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 自动生成代码
 * @since 2022-05-21
 */
@RestController
@RequestMapping("/tc")
public class TransactionController {
   @Autowired
   TransactionService transactionService;


    @RequestMapping("/xa")
    public String processWithXA() throws SQLException {
        transactionService.processWithXA();
        return "XA SUCCESS";
    }

    @RequestMapping("/base")
    public String processWithBASE() throws SQLException {
        transactionService.processWithBASE();
        return "BASE SUCCESS";
    }

}
